package data.join.com.carapi;

import android.text.TextUtils;

import com.google.gson.annotations.Expose;

import java.io.File;

/**
 * Created by Administrator on 2017/11/23.
 */

public class PhotoResult {
    @Expose
    public String imgurl;
    @Expose
    public String imgurlrear;

    public boolean isAvail(){
        boolean ret = false;

        if(!TextUtils.isEmpty(imgurl) && new File(imgurl).exists()){
            ret = true;
        }

        if(!TextUtils.isEmpty(imgurlrear) && new File(imgurlrear).exists()){
            ret = true;
        }

        return ret;
    }

    public boolean isAvailFront(){
        boolean ret = false;

        if(!TextUtils.isEmpty(imgurl) && new File(imgurl).exists()){
            ret = true;
        }

        return ret;
    }

    public boolean isAvailBack(){
        boolean ret = false;

        if(!TextUtils.isEmpty(imgurlrear) && new File(imgurlrear).exists()){
            ret = true;
        }

        return ret;
    }
}
